<template name="channel_info_panel">
  <div id="channel-info-panel-content" class="flex-grow-1 position-relative">
    <div class="p-3">
      {{#if openUpdatePanel}}
        {{> channel_info_panel_update}}
      {{else}}
        <img src="{{channel.cover}}" class="img-fluid rounded mb-3">
        <dl class="mb-3">
          <dt class="text-muted">频道名称</dt>
          <dd>{{channel.name}}</dd>
          {{#if channel.notes}}
            <dt class="text-muted">频道描述</dt>
            <dd>{{channel.notes}}</dd>
          {{/if}}
        </dl>
        <hr>

        <dl class="row font-weight-normal">
          <dt class="col-sm-4 text-muted">创建者</dt>
          <dd class="col-sm-8">
            <a href="/u/{{channel.owner.username}}">{{channel.owner.username}}</a>
          </dd>
          <dt class="col-sm-4 text-muted">类型</dt>
          <dd class="col-sm-8 ">{{channel.type.displayName}}</dd>
          <dt class="col-sm-4 text-muted">规模</dt>
          <dd class="col-sm-8 ">{{channel.numberOfPeople.displayName}}</dd>
          <dt class="col-sm-4 text-muted">创建日期</dt>
          <dd class="col-sm-8 ">{{momentLL channel.createdAt}}</dd>
          <dt class="col-sm-4 text-muted">权限</dt>
          <dd class="col-sm-8">
            {{channel.policy.displayName}}
            <small>{{apply channel.policy}}</small>
          </dd>
          <dt class="col-sm-4 text-muted">人数</dt>
          <dd class="col-sm-8">{{members channel.members}}</dd>
        </dl>
        <hr>
        {{#if isOwner}}
          <button type="button" class="btn btn-outline-primary btn-block" id="open-update-panel">修改频道信息</button>
        {{/if}}
      {{/if}}
    </div>
  </div>
</template>